
#ifndef  _RADIX_ARCHAISM_SOCKET_H_
#define  _RADIX_ARCHAISM_SOCKET_H_

#include <Archaism/Header.h>

_BeginNamespace(Radix)

class Socket
{
public:
	Socket();
	~Socket();

public:
	bool startup();
	void cleanup();
	bool connect(const char* hostName, const char* serviceName);
	bool listen(const char* hostName, const char* serviceName);
	Socket accept();
	void close();
	
	int recv(uchar* buffer, uint length);
	int send(uchar* buffer, uint length);

	bool available() const;

private:
	int mHandle;
};

_EndNamespace(Radix)

#endif//_RADIX_ARCHAISM_SOCKET_H_
